package testing.seperator;

import static org.junit.Assert.assertEquals;

import org.junit.Before;
import org.junit.Test;

import seperator.PuntSeperator;
import seperator.QuotationSeperator;
import words.Punctuation;
import words.Quotation;


public class QuotationSeperatorTest {
	QuotationSeperator seperator;
	Quotation quot;
	
	@Before
	public void setUp() throws Exception {
		this.seperator = new QuotationSeperator();
		
	}
	
	@Test
	public void test1()
	{
		String[] data = {"\"","The","god","loves","people",".","\"",",","He","said","."};
		
		seperator.setdata(data);
		seperator.seperate();
		quot = seperator.getResult();
		int result = quot.getArrayList().size();
		assertEquals(result,1);
	}
	@Test
	public void test2()
	{
		String[] data = {"The","god","loves","people",".",",","He","said","."};
		
		seperator.setdata(data);
		seperator.seperate();
		quot = seperator.getResult();
		int result = quot.getArrayList().size();
		assertEquals(result,0);
	}
	@Test
	public void test3()
	{
		String[] data = {"\"","The","god","loves","people",".","\"",",","He","said",".","\"","People","help","the","people",".","\""};

		
		seperator.setdata(data);
		seperator.seperate();
		quot = seperator.getResult();
		int result = quot.getArrayList().size();
		assertEquals(result,2);
	}
}
